package com.lagou.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class LoginController {

    @GetMapping("/login")
    public String login(String username, HttpServletRequest request) {
        System.out.println(username);
        return username + "登录成功！SESSIONID=" + request.getSession().getId();
    }

    @GetMapping("/hello")
    public String hello() {
        return "heloooo";
    }

}
